Function |saturating_to_i32
std/conv::|saturating_to_i32
Usage
|saturating_to_i32<T>(value)
Generics
◻ T:
SaturatingToI32
Parameters
↳ value:
T
Return
↴ i32
Turns data into i32
, saturating if needed.
This function makes a saturating and infaillible conversion to i32
.
If incoming data represents something out of bounds for i32
, then
the resulting value is set to minimum or maximum, depending what is
the closest to truth.